package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
import java.util.List;

/**
 * 采购信息实体类
 */
@TableName("t_buyer")
public class BuyerBean {
    // 采购信息id
    @TableId(value = "pk_buyerId",type = IdType.AUTO)
    private Integer id;
    // 供货商id
    @TableField("fk_cusId")
    private Integer supId;
    //供货商
    @TableField(exist = false)
    private SupplierBean supplierBean;
    // 采购员
    @TableField("b_cadre")
    private String cadre;
    // 采购时间
    @TableField("b_date")
    private LocalDate date = LocalDate.now();
    // 采购物品信息集合
    @TableField(exist = false)
    private List<BuyerInfoBean> buyerBean;


    public BuyerBean() {
    }

    public BuyerBean(Integer supId, String cadre) {
        this.supId = supId;
        this.cadre = cadre;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }


    public String getCadre() {
        return cadre;
    }

    public void setCadre(String cadre) {
        this.cadre = cadre;
    }

    public LocalDate getDate() {
        return date;
    }

    public void setDate(LocalDate date) {
        this.date = date;
    }

    public List<BuyerInfoBean> getBuyerBean() {
        return buyerBean;
    }

    public void setBuyerBean(List<BuyerInfoBean> buyerBean) {
        this.buyerBean = buyerBean;
    }

    public Integer getSupId() {
        return supId;
    }

    public void setSupId(Integer supId) {
        this.supId = supId;
    }

    public SupplierBean getSupplierBean() {
        return supplierBean;
    }

    public void setSupplierBean(SupplierBean supplierBean) {
        this.supplierBean = supplierBean;
    }

    @Override
    public String toString() {
        return "BuyerBean{" +
                "id=" + id +
                ", cusId=" + supId +
                ", supplierBean=" +supplierBean +
                ", cadre='" + cadre + '\'' +
                ", date=" + date +
                ", buyerBean=" + buyerBean +
                "}\n";
    }
}
